<%@ page import="cn.dgut.Utils.JDBCUtils" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.dgut.Entity.StudentWorks" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    Map<String,String> login = (Map<String, String>) request.getSession().getAttribute("isFrontLogin");
    int loginFlag=0;
    if(login!=null){
        loginFlag=1; //已经登录
    }
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="all,follow">
    <title>WeIn--学员作品</title>
    <link rel="shortcut icon" href="backstage/img/logo-title.png">
    <!-- global stylesheets -->
    <!--<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">-->
    <link rel="stylesheet" href="backstage/css/bootstrap.min.css">
    <link rel="stylesheet" href="backstage/css/font-awesome.min.css">
    <link rel="stylesheet" href="backstage/css/font-icon-style.css">
    <link rel="stylesheet" href="backstage/css/style1.min.css">
    <link rel="stylesheet" href="backstage/css/sucaijiayuan.css">
    <link rel="stylesheet" href="backstage/css/style.default.css" id="theme-stylesheet">

    <!-- Core stylesheets -->
    <link rel="stylesheet" href="backstage/css/style.css">
    <link rel="stylesheet" href="backstage/css/main.css">
    <style>
        .works-box{
            position: relative;
            color: rgba(0,0,0,0.5);
            margin-top: 20px;
            width: 31%;
            height: 200px;
            border-radius: 5px;
            transition: all 0.7s;
            border: 1px solid rgba(0,0,0,0.1);
            float: left;
            margin-left: 2%;
        }
        .works-box:hover{
            transform: translateY(-10px);
            box-shadow: 0 5px 10px 0 rgba(0,0,0,0.1);
        }
        .works-box:hover .works-view{
            display: block;
        }
        .works-info{
            width: 85%;
            margin: 20px auto;
        }
        .works-view{
            border-radius: 5px;
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            transition: all 0.7s;
        }
        .works-view a{
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-80%,-50%);
        }

    </style>
</head>
<body>
<header class="header">
    <nav class="navbar navbar-expand-lg" style="background:none;box-shadow: 0 0 0 0;">
        <div class="container">
            <div class="navbar-holder d-flex align-items-center justify-content-between">
                <div class="navbar-header">
                    <a href="index.jsp" class="navbar-brand">
                        <div class="brand-text brand-big hidden-lg-down"><img src="backstage/img/logo.png" alt="Logo" class="logo-img"></div>
                        <div class="brand-text brand-small"><img src="backstage/img/logo-min.png" alt="Logo" style="height: 30px;width:30px;margin-left: 5px;"></div>
                    </a>
                </div>
            </div>
            <ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
                <li class="nav-item d-flex align-items-center">
                    <a class="nav-link" href="index.jsp">首页</a>
                </li>
                <li class="nav-item d-flex align-items-center">
                    <a class="nav-link" href="Courses.jsp">相关课程</a>
                </li>
                <li class="nav-item d-flex align-items-center">
                    <a class="nav-link" href="Teachers.jsp">师资力量</a>
                </li>
                <li class="nav-item d-flex align-items-center">
                    <a class="nav-link" href="SudentWorks.jsp">学员作品</a>
                </li>
                <li class="nav-item d-flex align-items-center" style="margin-right: 70px;">
                    <a class="nav-link" href="Recruit.jsp">人才招聘</a>
                </li>
                <%
                    if(loginFlag==0){
                %>
                <li class="nav-item d-flex align-items-center">
                    <a class="nav-link" href="login.html">登录</a>
                </li>
                <li class="nav-item d-flex align-items-center">
                    <a class="nav-link" href="register.html">注册</a>
                </li>
                <%
                }else {
                %>
                <li class="nav-item d-flex align-items-center">
                    <a class="nav-link" href="show.jsp"><%=login.get("name")%></a>
                </li>
                <li class="nav-item d-flex align-items-center">
                    <a class="nav-link" href="/logoutServlet">注销</a>
                </li>
                <%
                    }
                %>
                <!--<li class="nav-item dropdown"><a id="profile" class="nav-link logout" data-target="#" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img src="img/avatar-1.jpg" alt="..." class="img-fluid rounded-circle" style="height: 30px; width: 30px;"></a>
                    <ul aria-labelledby="profile" class="dropdown-menu profile">
                        <li>
                            <a rel="nofollow" href="#" class="dropdown-item d-flex">
                                <div class="msg-profile"> <img src="backstage/img/avatar-1.jpg" alt="..." class="img-fluid rounded-circle"></div>
                                <div class="msg-body">
                                    <h3 class="h5">Steena Ben</h3><span>steenaben@Businessbox.com</span>
                                </div>
                            </a>
                            <hr>
                        </li>
                        <li>
                            <a rel="nofollow" href="profile.html" class="dropdown-item">
                                <div class="notification">
                                    <div class="notification-content"><i class="fa fa-user "></i>个人信息</div>
                                </div>
                            </a>
                        </li>
                        <li>
                            <a rel="nofollow" href="profile.html" class="dropdown-item">
                                <div class="notification">
                                    <div class="notification-content"><i class="fa fa-power-off"></i>退出</div>
                                </div>
                            </a>
                        </li>
                    </ul>
                </li>-->
            </ul>
        </div>
    </nav>
</header>
<div class="m-header-banner m-list-header" style="background: url(img/about-bg.jpg) 50% 0 no-repeat fixed;margin-top: -130px;height: 485px;">
    <section class="container">
        <hgroup data-am-scrollspy="{animation:'slide-bottom', delay: 262}" class="am-scrollspy-init am-scrollspy-inview am-animation-slide-bottom">
            <h2>学员作品</h2>
            <p> 结果才是最有力的证明，让学习成为一种习惯。</p>
        </hgroup>
    </section>
</div>

<div class="am-container" style="min-height: 300px;">
    <%
        JDBCUtils utils = new JDBCUtils();
        List list = utils.queryAllData("StudentWorks");
        for (int i = 0; i < list.size(); i++) {
            StudentWorks sw = (StudentWorks) list.get(i);
    %>
    <div class="works-box">
        <div class="works-info">
            <p>作品<%=i+1%></p>
            <p>学员：<%=sw.getStudent_name()%></p>
            <p>时间：<%=sw.getTime()%></p>
            <p>点击量：<%=sw.getViews()%></p>
        </div>
        <div class="works-view">
            <a href="showStudentWorks.jsp?id=<%=sw.getStudentWorks_id()%>" class="btn-add">查看详情</a>
        </div>
    </div>
    <%
        }
    %>
</div>

<footer class="m-footer" style="z-index:12;position:relative;padding-bottom: 40px;margin-top: 20px;">
    <div class="am-container">
        <section style="padding-bottom:10px;" class="am-g m-footer-container">
            <section class="am-u-sm-12 am-u-md-6 foot-font">
                <img width="100%" src="img/u360.png">
                <p>东莞尾音信息科技有限公司，旗下有尾音教育等品牌，在东莞松山湖设立尾音软件实训基地，由8年以上资深教育经验php讲师牵头，一线开发工程师组成的团队，针对不同学员采取不同的教学方案。全心全意为学员服务，提供最专业的就业培训，专注于为企业输送最专业的人才</p>
                <p style="margin-bottom:0">地址：东莞市松山湖生产力大厦南座313-317</p>
                <p style="margin-top:0">电话：0769 - 26620567 </p>
            </section>
            <section style="height: 350px; background: rgb(252, 249, 242); cursor: url(&quot;http://webapi.amap.com/theme/v1.3/openhand.cur&quot;), default;" id="wein-map" class="am-u-sm-12 am-u-md-6 amap-container">

                <object style="display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;" type="text/html" data="about:blank"></object><div class="amap-maps"><div class="amap-drags" style=""><div class="amap-layers" style="transform: translateZ(0px);"><div class="amap-markers" style="position: absolute; z-index: 120; top: 175px; left: 300px;"><div class="amap-marker" style="top: -31px; left: -9px; z-index: 100; transform: rotate(0deg); transform-origin: 9px 31px; display: block;"><div class="amap-icon" title="东莞松山湖生产力大厦南区313-317" style="position: absolute; width: 19px; height: 33px; opacity: 1;"><img src="http://webapi.amap.com/theme/v1.3/markers/b/mark_bs.png" style="width: 19px; height: 33px; top: 0px; left: 0px;"></div></div></div><canvas class="amap-labels" draggable="false" width="1200" height="700" style="position: absolute; z-index: 99; height: 350px; width: 600px; top: 0px; left: 0px;"></canvas><canvas class="amap-layer" width="750" height="437" style="position: absolute; z-index: 0; transform-origin: 375px 218.5px; transform: scale3d(0.8, 0.8, 1); top: -44px; left: -75px; height: 437px; width: 750px;"></canvas></div><div class="amap-overlays" style=""></div></div></div><div style="display: none;"></div><div class="amap-controls"></div><a class="amap-logo" href="http://gaode.com" target="_blank" style="display: block;"><img src="http://webapi.amap.com/theme/v1.3/logo@2x.png"></a><div class="amap-copyright" style="display: none; visibility: visible;"><!--v1.4.4--> © 2019 AutoNavi <span class="amap-mcode">- GS(2018)1709号</span></div></section>
            <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.4&amp;key=369d3223bc0e3feafc9c12c69bbbd5f7"></script>
            <script>
                var map = new AMap.Map('wein-map', {
                    center: [113.887971,22.930962],
                    zoom: 15
                });
                marker = new AMap.Marker({
                    position:[113.887971,22.930962],
                    animation:"AMAP_ANIMATION_DROP",
                    map:map,
                    title:"东莞松山湖生产力大厦南区313-317"
                });
            </script>
        </section>
    </div>

</footer>
</body>
</html>